listbox: Don't assume that row child == focus widget
authorTimm Bäder <mail@baedert.org>
Tue, 16 Jan 2018 14:12:24 +0000 (15:12 +0100)
committerTimm Bäder <mail@baedert.org>
Wed, 17 Jan 2018 20:57:19 +0000 (21:57 +0100)
With widgets supporting child widgets and custom GtkListBoxRow
subclasses, this might not be true.

gtk/gtklistbox.c

index f710bf1251889d3ea6e3bf0871147ed6b8e75d0d..32135f32149ac3c5e3efe74d13bf71470fd2a3a8 100644 (file)
@@ -3007,7 +3007,7 @@ gtk_list_box_row_focus (GtkWidget        *widget,
   else if (gtk_widget_get_focus_child (widget) != NULL)
     {
       /* Child has focus, always navigate inside it first */
-      if (gtk_widget_child_focus (child, direction))
+      if (gtk_widget_child_focus (gtk_widget_get_focus_child (widget), direction))
         return TRUE;
 
       /* If exiting child container to the left, select row  */